package com.shigen.file.controller;

import com.shigen.file.common.Result;
import com.shigen.file.entity.FirstMenu;
import com.shigen.file.service.IFirstMenuService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 一级菜单 前端控制器
 * </p>
 *
 * @author shigen.fu
 * @since 2022-06-04
 */
@RestController
@RequestMapping("menu")
public class FirstMenuController {

  @Resource
  private IFirstMenuService firstMenuService;

  /**
   * 获得系统的一级、二级菜单
   */
  @GetMapping(value = "get")
  public Result<List<FirstMenu>> getMenus() {
    return Result.success(firstMenuService.getAllMenus());
  }


}
